package com.gamefx.resource.events
{

	import flash.events.Event;
	import com.gamefx.resource.LoaderItem;


	public class LoaderEvent extends Event
	{
		public static const CANCEL:String = "cancel";
		public static const FAIL:String = "fail";
		public static const PARSE_COMPLETE:String = "parseComplete";
		public static const CHILD_OPEN:String = "childOpen";
		public static const CHILD_CANCEL:String = "childCancel";
		public static const CHILD_COMPLETE:String = "childComplete";
		public static const CHILD_FAIL:String = "childFail";

		
		public var loader:LoaderItem;
		public var text:String;

		/**
		 * Constructor
		 */
		public function LoaderEvent(type:String, loader:LoaderItem, text:String = "")
		{
			super(type, false, false);
			this.loader = loader;
			this.text = text;
		}

		public override function clone():Event
		{
			return new LoaderEvent(this.type, loader, this.text);
		}

	}

}
